<template>
  <div class="doctorApplyView detailView">
    <Modal v-model="isView"
           :mask-closable="false"
           title="编辑角色"
           :footer-hide="true">
      <div class="detailView">
        <div class="detail">
          <div class="name">申请时间</div>
          <div class="value">{{commonFunction.timeFormat(item.createTime).hasHMS}}</div>
        </div>
        <div class="detail">
          <div class="name">工作证</div>
          <div class="value">
            <img :src="item.certiUrl"
                 alt="工作证"
                 preview="doctorApplyView">
          </div>
        </div>
        <div class="detail">
          <div class="name">执业证</div>
          <div class="value">
            <img :src="item.qualiUrl"
                 alt="执业证"
                 preview="doctorApplyView">
          </div>
        </div>
        <div class="detail">
          <div class="name">医生</div>
          <div class="value">{{item.doctorDto?item.doctorDto.nickName:''}}</div>
        </div>
        <div class="detail">
          <div class="name">联系方式</div>
          <div class="value">{{item.doctorDto?item.doctorDto.loginName:''}}</div>
        </div>
        <div class="detail">
          <div class="name">工作年限</div>
          <div class="value">{{item.workLife}}年</div>
        </div>
        <div class="detail">
          <div class="name">科室</div>
          <div class="value">{{item.doctorDto?item.doctorDto.departmentName:''}}</div>
        </div>
        <div class="detail">
          <div class="name">职称</div>
          <div class="value">{{item.doctorTitle}}</div>
        </div>
        <div class="detail">
          <div class="name">医院</div>
          <div class="value">{{item.doctorDto?item.doctorDto.hospitalName:''}}</div>
        </div>
        <div class="detail">
          <div class="name">状态</div>
          <div class="value">{{item.passStatus|passStatus}}</div>
        </div>
        <div class="detail">
          <div class="name">发表文章</div>
          <div class="value">{{item.contentArticle}}</div>
        </div>
        <div class="detail">
          <div class="name">获奖项目</div>
          <div class="value">{{item.contentPrize}}</div>
        </div>
        <div class="detail">
          <div class="name">项目</div>
          <div class="value">{{item.contentProject}}</div>
        </div>
        <div class="detail">
          <div class="name">描述</div>
          <div class="value">{{item.remark}}</div>
        </div>
        <div class="detail">
          <div class="name">最后修改时间</div>
          <div class="value"
               v-if="item.lastUpdateTime">{{commonFunction.timeFormat(item.lastUpdateTime).hasHMS}}</div>
        </div>
        <div class="detail"
             v-if="item.passStatus!=0">
          <div class="name">审核人</div>
          <div class="value">{{item.adminName}}</div>
        </div>
      </div>
    </Modal>
  </div>
</template>

<script>
  import { doctor } from '@/api/codeName'
  export default {
    name: "doctorApplyView",
    data () {
      return {
        isView: false,
        item: {
          id: 0,
          name: '',
          remark: ''
        }
      }
    },
    methods: {
      openView (row) {
        this.isView = true
        this.item = row
      },
      handleCancle () {
        this.isView = false
        this.$refs['form'].resetFields();
      }
    },
    filters: {
      passStatus: (value) => {
        for (let i = 0; i < doctor.doctorWithdrawals.status.length; i++) {
          if (value == doctor.doctorWithdrawals.status[i].code) {
            return doctor.doctorWithdrawals.status[i].name
          }
        }
        return value
      }
    },
    components: {}
  }
</script>

<style lang="scss" type="text/scss" rel="stylesheet/scss">
  .doctorApplyView {
  }
</style>
